import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
// 导入路由
import router from './router'
// 导入elementui Plus
import ElementPlus from 'element-plus'
// 导入图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 导入样式
import 'element-plus/dist/index.css'
// 导入导入封装的axios模块
import request from './utils/request'

// 添加加事件管理者’passive'
import 'default-passive-events'


// import './assets/main.css'

const app = createApp(App)

app.config.globalProperties.$http = request
// 注册图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 注册pinia
app.use(createPinia())
// 挂载路由
app.use(router)
// 注册elementui
app.use(ElementPlus)

app.mount('#app')
